{VERSION 6 0 "IBM INTEL NT" "6.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 256 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE " " -1 257 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 258 " Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 259 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 260 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 261 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 262 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 263 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 } {CSTYLE "" -1 264 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE " " -1 265 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 266 " Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 267 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 268 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 269 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 270 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 271 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 } {CSTYLE "" -1 272 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE " " -1 273 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 274 " Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 275 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 276 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 277 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 278 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 279 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 } {CSTYLE "" -1 280 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE " " -1 281 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 282 " Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 283 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 284 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 285 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 286 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 287 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 } {CSTYLE "" -1 288 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE " " -1 289 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 290 " Times" 1 12 0 0 0 1 1 2 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 291 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 292 "Times" 1 12 0 0 0 1 2 1 2 2 2 2 0 0 0 1 }{CSTYLE "" -1 293 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 294 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE " " -1 295 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 297 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 298 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Heading 1" 0 3 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }1 0 0 0 8 4 0 0 0 0 0 0 -1 0 }{PSTYLE "Title" 0 18 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 1 0 0 0 0 0 0 0 }3 0 0 -1 12 12 0 0 0 0 0 0 19 0 } {PSTYLE "" 0 256 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 18 "" 0 "" {TEXT -1 9 "Lecture 6" }}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 31 " Introduction to LinearAlgebra " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 60 "There ar e lots of things one can do with matrices after the " }{TEXT 256 13 "L inearAlgebra" }{TEXT -1 21 " package is loaded as" }}{PARA 0 "" 0 "" {TEXT -1 73 "we did above. If the matrices are not too big maple will easily compute " }{TEXT 257 12 "determinants" }{TEXT -1 1 "," }} {PARA 0 "" 0 "" {TEXT -1 5 "find " }{TEXT 258 11 "eigenvalues" }{TEXT -1 2 ", " }{TEXT 259 12 "eigenvectors" }{TEXT -1 2 ", " }{TEXT 260 22 "Jordan canonical forms" }{TEXT -1 245 ", etc.... Here are a few simpl e examples:\n\nNote that unless the matrices contain decimal points (f loating point numbers) the computations will be exact when possible. \+ In past versions of Maple the package linalg was used instead of the p ackage " }{TEXT 261 13 "LinearAlgebra" }{TEXT -1 22 ". However the pac kage " }{TEXT 262 13 "LinearAlgebra" }{TEXT -1 96 " is in many respect s better, so I will discuss it exclusively. Most of the commands in t he old " }{TEXT 263 6 "linalg" }{TEXT -1 71 " package are written in l ower case and often abbreviated, for example, " }{TEXT 264 3 "det" } {TEXT -1 2 ", " }{TEXT 265 9 "eigenvals" }{TEXT -1 2 ", " }{TEXT 266 6 "matrix" }{TEXT -1 2 ", " }{TEXT 267 10 "randmatrix" }{TEXT -1 138 " . In contrast, the commands in the newer LinearAlgebra package all be gin with capital letters and are spelled out in full, for example: " }{TEXT 268 11 "Determinant" }{TEXT -1 2 ", " }{TEXT 269 11 "Eigenvalue s" }{TEXT -1 2 ", " }{TEXT 270 6 "Matrix" }{TEXT -1 2 ", " }{TEXT 271 14 "RandomMatrix. " }{TEXT -1 92 "This has the advantage that you don' t have to try to remember the abbreviation. \n\nNote that " }{TEXT 272 8 "matrices" }{TEXT -1 5 " and " }{TEXT 273 6 "arrays" }{TEXT -1 20 " are different from " }{TEXT 274 8 "Matrices" }{TEXT -1 5 " and " }{TEXT 275 6 "Arrays" }{TEXT -1 47 ". They are stored in memory in dif ferent ways. " }{TEXT 276 8 "Matrices" }{TEXT -1 5 " and " }{TEXT 277 6 "Arrays" }{TEXT -1 43 " are generally handled more efficiently by " }{TEXT 278 5 "Maple" }{TEXT -1 1 "." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 20 "with(LinearAlgebra);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 173 "Execute the following commands. They should be self explanatory. Note that th ere are several ways to define a Matrix. Here are three ways. Personal ly I prefer the first way." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 98 "A:=Matrix([[2,3,0],[0,5,3],[0,0,4]]);\nB:=<<2|3|0>, <0|5|3>,<0|0|4 >>;\nC:=<<2,0,0>|<3,5,0>|<0,3,4>>;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 84 "We may obtain matrix products, inverses, sums and scalar-matrix products as follows:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 35 "Ma trixMatrixMultiply(A,B); #or A.B;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "A^3;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "Mat rixInverse(A); #or A^(-1);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "MatrixAdd(A,B); #or A+B;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "ScalarMultiply(A,7); #or 7*A;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "Determinant(A);\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 29 "Recall that if A is a matrix " }{XPPEDIT 18 0 "lambda;" "6#%'la mbdaG" }{TEXT -1 17 " is a scalar and " }{XPPEDIT 18 0 "v;" "6#%\"vG" }{TEXT -1 51 " is a non-zero vector written as a column then if " } {XPPEDIT 18 0 "Av = lambda*v;" "6#/%#AvG*&%'lambdaG\"\"\"%\"vGF'" } {TEXT -1 18 " then we say that " }{XPPEDIT 18 0 "lambda;" "6#%'lambdaG " }{TEXT -1 32 " is an eigenvector belonging to " }{XPPEDIT 18 0 "v;" "6#%\"vG" }{TEXT -1 20 " . For example, if " }{XPPEDIT 18 0 "v;" "6#% \"vG" }{TEXT -1 14 " is defined by" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "v:=<1,1,0>;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 66 "W e see that v is an eigenvector of A corresponding to eigenvalues " } {XPPEDIT 18 0 "lambda = 5;" "6#/%'lambdaG\"\"&" }{TEXT -1 1 "." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "A.v = 5*v;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 70 "We can find all eigenvalues and corresponding e igenvectors as follows:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 " Eigenvectors(A); " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 167 "This means \+ that the eigenvalues of A are 2, 4 and 5 and that the corresponding ei genvectors are the columns of the second matrix. We can get hold of t hese as follows:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "E,V:=Ei genvectors(A);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 62 "for i fro m 1 to 3 do\nlambda[i],v[i]:=E[i],Column(V,i);\nend do;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 138 "Note that to check whether or not two Ma trices A and B or two Vectors v and w are equal we must use Equal(A,B) or Equal(v,w). For example:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "A,B;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "Equal(A,B);" } }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 50 "Note for example that the follow ing does not work!" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 53 "if A \+ = B then print(true); else print(false); end if;" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 20 "Instead we must use:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 58 "if Equal(A,B) then print(true); else print(false); en d if;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 18 "We now check that " } {XPPEDIT 18 0 "A*v[i] = lambda[i]*v[i];" "6#/*&%\"AG\"\"\"&%\"vG6#%\"i GF&*&&%'lambdaG6#F*F&&F(6#F*F&" }{TEXT -1 39 " for i = 1, 2: Note tha t Maple treats " }{XPPEDIT 18 0 "v[i];" "6#&%\"vG6#%\"iG" }{TEXT -1 67 " as a column vector for purposes of multiplication by the matrix A ." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 60 "for i from 1 to 3 do i ,Equal(A.v[i],lambda[i]*v[i]); end do;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 80 "Here are a few more examples of what is possible with the package LinearAlgebra:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "Id,Z:=IdentityMatrix(3),ZeroMatrix( 3);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "GaussianElimination( A);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "ReducedRowEchelonFor m(A);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "JordanForm(A);" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "CharacteristicPolynomial(A, x);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "ColumnDimension(A), \+ RowDimension(A);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "T:=Matr ix([[1,2,3],[2,4,6],[3,6,9],[3,4,5]]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "ColumnSpace(T);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 67 "The two column vectors here form a basis for the column space of A ." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "RowSpace(T);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 98 "The row space of T is of dimension 2 as well. But the vectors in the basis are three-dimensional. " }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "NullSpace(T);" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 99 "The null space of T is of dimension 1 and a basis \+ is given by the single column vector in this set." }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 8 "Rank(T);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 73 "Maple can also generate random matrices through the use of the pro cedure " }{TEXT 293 12 "RandomMatrix" }{TEXT -1 67 ". The calling proc edure is RandomMatrix(r,c,generator=a..b), where " }{TEXT 294 1 "r" } {TEXT -1 48 " specifies the number of rown in the matrix and " }{TEXT 295 1 "c" }{TEXT -1 39 " represents the number of columns, and " } {TEXT 297 1 "a" }{TEXT -1 5 " and " }{TEXT 298 1 "b" }{TEXT -1 45 " re present the range of the posssible values." }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 34 "RandomMatrix(3,3,generator=0..10);" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 9 " Vectors " }}{PARA 0 "" 0 "" {TEXT -1 98 " Maple has several data types which seem almost the same, but behave so mewhat differently, namely, " }{TEXT 279 20 "Vector, vector, list" } {TEXT -1 18 ", (1-dimensional) " }{TEXT 280 5 "array" }{TEXT -1 21 " a nd (1-dimensional) " }{TEXT 281 5 "Array" }{TEXT -1 55 ". Here we just concentrate on discussing the data type " }{TEXT 282 7 "Vector " } {TEXT -1 24 "and how to convert from " }{TEXT 283 7 "Vector " }{TEXT -1 3 "to " }{TEXT 284 4 "list" }{TEXT -1 10 " and back." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "restart:\nwith(LinearAlgebra):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "L:=[1,2,3]; " }{TEXT -1 2 " \n\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "type(L,list), type( L,Vector);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "v1:=Vector([1 ,2,3]); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "type(v1,Vector) , type(v1,list);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "v2:=<1, 2,3>;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "type(v1,Vector), t ype(v1,list);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "M:=Matrix( [[1],[2],[3]]); " }{TEXT -1 1 "\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "type(v1,Vector), type(v1,list), type(M,Matrix);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 221 "Note that the 1 by 3 Matrices loo k like Vectors in the output region. But they behave differently. The Matrices need two indices to specify entries, whereas the Vectors nee d only 1 entry. Execute the following examples: " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 3 "v1;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "v1[1],v1[2],v1[3];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2 "M; " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "M[1];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "M[1,1],M[2,1],M[3,1];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }} }}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 22 "Viewing large matrices" }} {PARA 0 "" 0 "" {TEXT -1 155 "Matrices that exceed the dimensions 10 b y 10 are not displayed when defined. There are however, various ways t o see the Matrix entries. Here's an example:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "M:=RandomMatrix(11,11);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 21 "One way to \"see\" the " }{TEXT 285 6 "Matrix" }{TEXT -1 23 " is to convert it to a " }{TEXT 286 6 "matrix" }{TEXT -1 82 " w hich has no such limitations on the size output. Nevertheless it is be st to use " }{TEXT 287 8 "Matrices" }{TEXT -1 33 ", since they are mor e efficient. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "convert(M, matrix);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 37 "Another way is to rig ht click on the " }{TEXT 288 6 "output" }{TEXT -1 67 " of , for examp le, the following command. Then select the option " }{TEXT 289 6 "Bro wse" }{TEXT -1 178 ". You will see a color representation of the Matri x. If you click and drag down the cursor repeatedly you will eventua lly see the numbers in the individual cells of the Matrix." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "RandomMatrix(100,100);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 36 " Multiplying a matrix times a vector" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 293 "Recall that if A is an n by k matrix and B is an m by t matrix then the product AB is defined \+ if and only if k = m. Maple uses this same rule. However if A is an n \+ by k matrix and v is a Vector of length k then Maple computes the pro duct as if v was a k by 1 matrix. Here are some examples: " }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "A: =RandomMatrix(2,3);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "v:=R andomVector(3);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "A.v;" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 82 "As the next commands show when exe cuted one cannot multiply a Matrix times a list." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "L:=[1,2,3];\nA.L;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 51 "But we can convert L to a Vector with the command:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "v3:=Vector(L);" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 27 " Plotting vectors as arrows" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 115 "We will have more to say about plotting \+ later. But here we discuss briefly how to plot Vectors: We plot Vector s as " }{TEXT 290 6 "arrows" }{TEXT -1 110 " from the origin to the po int given by the coordinates, as follows. Recall the notation <0,0,1> \+ for a Vector. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "type(<0,0 ,1>, Vector);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 8 "To plot " }{TEXT 291 7 "vectors" }{TEXT -1 39 " as arrows we need to load the package \+ " }{TEXT 292 5 "plots" }{TEXT -1 1 ":" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(plots):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 259 "a1 := arrow(<0,0,1>, shape=harpoon, color=red):\na2 := arrow(<0 ,1.6,0>, shape=arrow, color=green):\na3 := arrow(<1,0,0>, shape=double _arrow,color=blue):\na4 := arrow(<1,1.6,1>, shape=arrow, color=black): \ndisplay(a1, a2, a3, a4, scaling=CONSTRAINED, axes=BOXED);\n" }{TEXT -1 108 "You should reduce the size of the plot before continuing. Note that it can be rotated after you click on it." }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 35 "(For other w ays to plot arrows see " }{MPLTEXT 1 0 16 "?plottools,arrow" }{TEXT -1 5 " and " }{MPLTEXT 1 0 12 "?plots,arrow" }{TEXT -1 3 " .)" }}} {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG }{EXCHG }{EXCHG }{EXCHG {PARA 256 "" 0 "" {TEXT -1 5 "-End-" }}}}{MARK "10" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }